package com.cyl.manager.aws.convert;

import com.cyl.manager.aws.domain.entity.ShopStatistics;
/**
 * 系统数据统计  DO <=> DTO <=> VO / BO / Query
 *
 * @author zcc
 */
public class ShopStatistics2Convert  {

	public static ShopStatistics dosAdddos(ShopStatistics thisDate,ShopStatistics dbDate) {
		if(thisDate==null) {
			return dbDate;
		}
		if(dbDate==null) {
			return thisDate;
		}
		ShopStatistics ret = new ShopStatistics();

		ret.setDeptDpId(thisDate.getDeptDpId());
		ret.setDeptTzId(thisDate.getDeptTzId());
		ret.setDeptZbjId(thisDate.getDeptZbjId());
		
		ret.setPayAmount(thisDate.getPayAmount().add(dbDate.getPayAmount()));
		ret.setPayFeeAmount(thisDate.getPayFeeAmount().add(dbDate.getPayFeeAmount()));
		
		ret.setRetAmount(thisDate.getRetAmount().add(dbDate.getRetAmount()));
		ret.setRetFeeAmount(thisDate.getRetFeeAmount().add(dbDate.getRetFeeAmount()));
		
		ret.setPayQuantity(thisDate.getPayQuantity()+dbDate.getPayQuantity());
		ret.setRetQuantity(thisDate.getRetQuantity()+dbDate.getRetQuantity());
		
		ret.setPayConut(thisDate.getPayConut()+dbDate.getPayConut());
		ret.setRetConut(thisDate.getRetConut()+dbDate.getRetConut());
		ret.setMemberConut(thisDate.getMemberConut());
		ret.setMemberDayConut(thisDate.getMemberDayConut()+dbDate.getMemberDayConut());
		ret.setMemberLoginConut(thisDate.getMemberLoginConut()+dbDate.getMemberLoginConut());

	    
		return ret;
		
	}
}
